<template>
  <div>
    tv
    <button @click="handleClick">click</button>
    <br>
    <button @click="gotoDetail">goto detail</button>

    
  </div>
</template>

<script>
export default {
  methods: {
    handleClick(){
      console.log(0);
      //编程式导航
      this.$router.push('/')
    },

    gotoDetail(){
      console.log("goto detail");
      // this.$router.push("/detail?id=1");
      this.$router.push({name: "detail", params: {id:33}});
    }
  },
  
}
</script>

<style>

</style>